package com.hsmpay.mobile.pojo.finance;

import java.util.Date;

import com.hsmpay.common.pojo.BasePojo;
import com.hsmpay.common.util.NumberUtil;
import org.apache.commons.lang3.StringUtils;

/**
 * 结算文件表 java bean
 * 对应 info_batchClear_log表
 * @created 2013-6-3
 * @author 颜铃璋
 */
public class BatchClearLog  extends BasePojo {
	private static final long serialVersionUID = -8927337251165155512L;
	
	//用户反馈基本属性
	private Long id;//ID
	private Long bcFileId;//结算文件ID
	private Long combineOrderId;//合并订单ID
	private Integer status;//0 结算失败 1 完成结算 2等待支付宝结算  3未付款
	private String serialNum;//提现流水号
	private Integer isReturn;//退票 1 为退票 0为默认非退票
	private String message;//错误信息
	private Integer sort;//排序  	其实是记录结算的顺序  对账是就是根据这个字段
	private Integer isRTNError;//是否是RNT错误
	private String responseCode;//应答码
	private Integer isReturnAB;//0 未退款 1 退款，将结算订单中的钱添加到用户账户余额
	
	//冗余数据  记录用户结算日志  防止用户修改卡号信息后  没有了清算日志 
	private String userName;//收款人姓名
	private String bankCard;//收款人卡号
	private String openingBank;//开户行
	private String branchesBank;//支行 
	private Integer bBankProvince;//支行省
	private Integer bBankCity;//支行市
	private String branchesBankCode;//支行代码   万三需要
	private Double transMoney;//交易金额
	private String accBankCode;//银行代码
	private Double revenueFee;//渠道手续费
	private Long channelId;//通道ID
	private Integer clearType;//2 基本结算 3 提现 4 佣金结算
	
	private String merchantSerial;//流水号 id 补全 20位  不够在前面添0
	private String transSerialsId;//第三方流水号
	private String searchId;//凭证号
	private Date createDate;//创建时间
	private Date updateDate;//更新时间
	
	//合单
	private Long terminalTypeId;//终端类型
	private Long roleId;//终端角色ID
	private String loginName;//登录名
	private Long organizationId;//机构Id
	private String terminalTypeName;//终端类型名称
	private String roleName;//终端角色名称
	private String organizationName;//机构名称
	
	//其他
	private String otherParam;//其他查询条件
	private Long batchClearId;//查询所有结算批次的列表
	private Long paramOrgId;//查询参数
	private String layer;//查询参数
	private Double minTranMoney;//最小交易额
	private Double maxTranMoney;//最大交易额
	private Double totalMoneySum;
	private Integer totalCount;
	private String combineOrderIds;//合并订单id集合
	private Date startDate;
	private Date endDate;
	private String clearMac;
	private String inLoginName; // in登录名
	private String inLoginNameTemp; //in登录名

    //T+0日结算报表用
    private Double receivablesTotalMoney; //收款总金额
    private Double receivablesTotalFee; //收款总手续费
    private Double cashTotalMoney; //提现总金额
    private Double cashMoneyTotalFee; //提现总手续费
    private int cashMoneyTotalItems; //提现总笔数

   // private String actorCode;//
    
    private String zxbackCode;//银行联行号
    
	public Long getParamOrgId() {
		return paramOrgId;
	}
	public void setParamOrgId(Long paramOrgId) {
		this.paramOrgId = paramOrgId;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getCombineOrderId() {
		return combineOrderId;
	}
	public void setCombineOrderId(Long combineOrderId) {
		this.combineOrderId = combineOrderId;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getSerialNum() {
		return serialNum;
	}
	public void setSerialNum(String serialNum) {
		this.serialNum = serialNum;
	}
	public Integer getIsReturn() {
		return isReturn;
	}
	public void setIsReturn(Integer isReturn) {
		this.isReturn = isReturn;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public Long getBcFileId() {
		return bcFileId;
	}
	public void setBcFileId(Long bcFileId) {
		this.bcFileId = bcFileId;
	}
	public Integer getSort() {
		return sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getBankCard() {
		return bankCard;
	}
	public void setBankCard(String bankCard) {
		this.bankCard = bankCard;
	}
	public String getOpeningBank() {
		return openingBank;
	}
	public void setOpeningBank(String openingBank) {
		this.openingBank = openingBank;
	}
	public String getBranchesBank() {
		return branchesBank;
	}
	public void setBranchesBank(String branchesBank) {
		this.branchesBank = branchesBank;
	}
	public Integer getBBankProvince() {
		return bBankProvince;
	}
	public void setBBankProvince(Integer bankProvince) {
		bBankProvince = bankProvince;
	}
	public Integer getBBankCity() {
		return bBankCity;
	}
	public void setBBankCity(Integer bankCity) {
		bBankCity = bankCity;
	}
	public String getBranchesBankCode() {
		return branchesBankCode;
	}
	public void setBranchesBankCode(String branchesBankCode) {
		this.branchesBankCode = branchesBankCode;
	}
	public Double getTransMoney() {
		return transMoney;
	}
	public void setTransMoney(Double transMoney) {
		this.transMoney = transMoney;
	}
	public Integer getIsRTNError() {
		return isRTNError;
	}
	public void setIsRTNError(Integer isRTNError) {
		this.isRTNError = isRTNError;
	}
	public String getResponseCode() {
		return responseCode;
	}
	public void setResponseCode(String responseCode) {
		this.responseCode = responseCode;
	}
	public Integer getIsReturnAB() {
		return isReturnAB;
	}
	public void setIsReturnAB(Integer isReturnAB) {
		this.isReturnAB = isReturnAB;
	}
	public String getOtherParam() {
		return otherParam;
	}
	public void setOtherParam(String otherParam) {
		this.otherParam = otherParam;
	}
	public Long getBatchClearId() {
		return batchClearId;
	}
	public void setBatchClearId(Long batchClearId) {
		this.batchClearId = batchClearId;
	}
	public Long getTerminalTypeId() {
		return terminalTypeId;
	}
	public void setTerminalTypeId(Long terminalTypeId) {
		this.terminalTypeId = terminalTypeId;
	}
	public String getTerminalTypeName() {
		return terminalTypeName;
	}
	public void setTerminalTypeName(String terminalTypeName) {
		this.terminalTypeName = terminalTypeName;
	}
	public Long getRoleId() {
		return roleId;
	}
	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}
	public String getRoleName() {
		return roleName;
	}
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public Long getOrganizationId() {
		return organizationId;
	}
	public void setOrganizationId(Long organizationId) {
		this.organizationId = organizationId;
	}
	public String getOrganizationName() {
		return organizationName;
	}
	public void setOrganizationName(String organizationName) {
		this.organizationName = organizationName;
	}
	public String getAccBankCode() {
		return accBankCode;
	}
	public void setAccBankCode(String accBankCode) {
		this.accBankCode = accBankCode;
	}
	public Double getRevenueFee() {
		return revenueFee;
	}
	public void setRevenueFee(Double revenueFee) {
		this.revenueFee = revenueFee;
	}
	public Long getChannelId() {
		return channelId;
	}
	public void setChannelId(Long channelId) {
		this.channelId = channelId;
	}
	public Integer getClearType() {
		return clearType;
	}
	public void setClearType(Integer clearType) {
		this.clearType = clearType;
	}
	public String getMerchantSerial() {
		if(null == merchantSerial && null != id)
			merchantSerial = NumberUtil.supplyAll(id.toString(),20);
		return merchantSerial;
	}
	public void setMerchantSerial(String merchantSerial) {
		this.merchantSerial = merchantSerial;
	}
	public String getTransSerialsId() {
		return transSerialsId;
	}
	public void setTransSerialsId(String transSerialsId) {
		this.transSerialsId = transSerialsId;
	}
	public String getSearchId() {
		return searchId;
	}
	public void setSearchId(String searchId) {
		this.searchId = searchId;
	}
	public Double getMinTranMoney() {
		return minTranMoney;
	}
	public void setMinTranMoney(Double minTranMoney) {
		this.minTranMoney = minTranMoney;
	}
	public Double getMaxTranMoney() {
		return maxTranMoney;
	}
	public void setMaxTranMoney(Double maxTranMoney) {
		this.maxTranMoney = maxTranMoney;
	}
	public Double getTotalMoneySum() {
		return totalMoneySum;
	}
	public void setTotalMoneySum(Double totalMoneySum) {
		this.totalMoneySum = totalMoneySum;
	}
	public Integer getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	public String getCombineOrderIds() {
		return combineOrderIds;
	}
	public void setCombineOrderIds(String combineOrderIds) {
		this.combineOrderIds = combineOrderIds;
	}
	public String getLayer() {
		return layer;
	}
	public void setLayer(String layer) {
		this.layer = layer;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public String getClearMac() {
		return clearMac;
	}
	public void setClearMac(String clearMac) {
		this.clearMac = clearMac;
	}

	public String getInLoginName() {
		return inLoginName;
	}
	public void setInLoginName(String inLoginName) {
		// this.inLoginName = inLoginName;
		if (StringUtils.isNotBlank(inLoginName)) {
			this.inLoginName = "'" + inLoginName.replaceAll(",", "','")+"'";
		}
	}

	public String getInLoginNameTemp() {
		return inLoginNameTemp;
	}

	public void setInLoginNameTemp(String inLoginNameTemp) {
		setInLoginName(inLoginNameTemp);
		this.inLoginNameTemp = inLoginNameTemp;
	}

    public Double getReceivablesTotalMoney() {
        return receivablesTotalMoney;
    }

    public void setReceivablesTotalMoney(Double receivablesTotalMoney) {
        this.receivablesTotalMoney = receivablesTotalMoney;
    }

    public Double getReceivablesTotalFee() {
        return receivablesTotalFee;
    }

    public void setReceivablesTotalFee(Double receivablesTotalFee) {
        this.receivablesTotalFee = receivablesTotalFee;
    }

    public Double getCashTotalMoney() {
        return cashTotalMoney;
    }

    public void setCashTotalMoney(Double cashTotalMoney) {
        this.cashTotalMoney = cashTotalMoney;
    }

    public Double getCashMoneyTotalFee() {
        return cashMoneyTotalFee;
    }

    public void setCashMoneyTotalFee(Double cashMoneyTotalFee) {
        this.cashMoneyTotalFee = cashMoneyTotalFee;
    }

    public int getCashMoneyTotalItems() {
        return cashMoneyTotalItems;
    }

    public void setCashMoneyTotalItems(int cashMoneyTotalItems) {
        this.cashMoneyTotalItems = cashMoneyTotalItems;
    }
	public String getZxbackCode() {
		return zxbackCode;
	}
	public void setZxbackCode(String zxbackCode) {
		this.zxbackCode = zxbackCode;
	}
}
